package routers

import (
	"github.com/gin-gonic/gin"
	"gvb-server/Middlewares"
	Api "gvb-server/api"
)

func (ApiRoute) Pub(r *gin.RouterGroup) {
	ApiGroup := Api.GroupAPI.PubApi
	{
		r.GET("/pub/:st", Middlewares.Cors(), Middlewares.JWTAuthMiddleware(), Middlewares.InitMiddleware, ApiGroup.Roles)
		r.GET("/pub/depart/:st", Middlewares.Cors(), Middlewares.JWTAuthMiddleware(), Middlewares.InitMiddleware, ApiGroup.Departments)
		r.POST("/pub/imp-any", Middlewares.Cors(), Middlewares.JWTAuthMiddleware(), Middlewares.InitMiddleware, ApiGroup.ImportAny)
	}
}
